﻿@model CustomerManagement.DataAccess.Customer


@using (Html.BeginForm("CreatePartial", "Customer", FormMethod.Post, new { @class = "modal-form" }))
{
    @Html.AntiForgeryToken()
    @Html.ValidationSummary(true)
    <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal">
            ×</button>
        <h3>
            Create Customer
        </h3>
    </div>
    <div class="modal-body form-horizontal">

        <div class="control-group">
            @Html.LabelFor(model => model.Name, new { @class = "control-label" })
            <div class="controls">
                @Html.EditorFor(model => model.Name)
                @Html.ValidationMessageFor(model => model.Name, null, new { @class = "help-inline" })
            </div>
        </div>

        <div class="control-group">
            @Html.LabelFor(model => model.Phone, new { @class = "control-label" })
            <div class="controls">
                @Html.EditorFor(model => model.Phone)
                @Html.ValidationMessageFor(model => model.Phone, null, new { @class = "help-inline" })
            </div>
        </div>

        <div class="control-group">
            @Html.LabelFor(model => model.Address, new { @class = "control-label" })
            <div class="controls">
                @Html.EditorFor(model => model.Address)
                @Html.ValidationMessageFor(model => model.Address, null, new { @class = "help-inline" })
            </div>
        </div>

        <div class="control-group">
            @Html.LabelFor(model => model.AreaId, "AreaId", new { @class = "control-label" })
            <div class="controls">
                @Html.DropDownList("AreaId", String.Empty)
                @Html.ValidationMessageFor(model => model.AreaId, null, new { @class = "help-inline" })
            </div>
        </div>

        <div class="control-group">
            @Html.LabelFor(model => model.CustomerType, new { @class = "control-label" })
            <div class="controls">
                @Html.EditorFor(model => model.CustomerType)
                @Html.ValidationMessageFor(model => model.CustomerType, null, new { @class = "help-inline" })
            </div>
        </div>

        <div class="modal-footer form-actions no-color">
            <input type="submit" value="Create" class="btn btn-small btn-success" />
            <a id=".btn-close" class="btn btn-small" data-dismiss="modal">Close</a>
        </div>
    </div>
}

@section Scripts {
    @Scripts.Render("~/bundles/jqueryval")
}

